package com.ruiyi.careryun.mapper.ota;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.ruiyi.careryun.beans.VersionAndroid;

public interface VersionAndroidMapper {
    void add(VersionAndroid versionAndroid);

    @Select("SELECT count(1) from version_android va  WHERE va.id>(SELECT v.id FROM version_android v WHERE v.version=#{0} and v.type=#{1}) and va.type=#{1}")
    Integer getVersionDiffCount(String androidVersion, Integer type);

    public VersionAndroid getLastVersionInfoByType(Integer type);

    @Select("SELECT version from version_android va WHERE va.type=#{type}")
    List<String> getAllVersionByType(Integer type);

}
